package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

@Setter
@Getter
@ToString
public class ClassInfo implements Serializable {
    private Long id;

    private String name;

    private Integer number;

    private Employee employee = new Employee();

    public String getJson() {
        Map<String, Object> map = new HashMap<>();
        map.put("id", id);
        map.put("name", name);
        map.put("number", number);
        map.put("employee", employee);
        return JSON.toJSONString(map);
    }

}